﻿// *----------------------------------------------------------------
// Copyright (C) 2017 通通优品
// 版权所有。
// 
// 类名：IClientService.cs
// 功能描述：TongTongMall.MallWeb.Application
// 
// Create User：jym 2017/02/09
// 
// Edit User：UserName,EditTime
// Describe：Describe
// ----------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TongTongMall.Application.Services;
using TongTongMall.MallWeb.Application.Client.Dto;

namespace TongTongMall.MallWeb.Application.Client
{
    public interface IClientService : IApplicationService
    {
        /// <summary>
        /// 根据客户端ID获取客户端授权数据
        /// </summary>
        /// <param name="username"></param>
        /// <returns></returns>
        Task<ClientDto> Get(string username);

        /// <summary>
        /// 转移缓存
        /// </summary>
        /// <param name="sessionKey">匿名用户标识</param>
        /// <param name="userId">转移到的用户标识</param>
        /// <param name="tenantId"></param>
        /// <param name="tenantName"></param>
        /// <returns></returns>
        Task TransferCache(string sessionKey, long userId, long tenantId, string tenantName);

        /// <summary>
        /// 缓存延期
        /// </summary>
        /// <param name="keys"></param>
        /// <returns></returns>
        Task Delayed(string keys);
    }
}
